package com.wxzhou.wangzhuan.dto;

import org.eclipse.microprofile.openapi.annotations.media.Schema;

import java.io.Serializable;

@Schema(description = "通用请求参数", example = "{\"ctime\":1703123456789,\"sign\":\"abc123\",\"encrypted_data\":\"xxx\",\"salt\":\"xxx\",\"device_fingerprint\":\"xxx\"}")
public class CommonRequestDto implements Serializable {
    /**
     * 客户端请求时间
     */
    @Schema(description = "客户端请求时间戳（毫秒）", example = "1703123456789")
    private Long ctime;
    /**
     * 签名值
     */
    @Schema(description = "请求签名值，用于验证请求合法性", example = "abc123")
    private String sign;

    /**
     * 版本名
     */
    @Schema(description = "版本名", example = "1.1.0")
    private String versionName;

    /**
     * 版本号
     */
    @Schema(description = "版本号", example = "110")
    private Integer versionCode;

    /**
     * 加密的数据内容（可选，用于需要加密的API）
     */
    @Schema(description = "加密的数据内容", example = "encrypted_content_here")
    private String encryptedData;

    /**
     * 随机盐值（可选，用于需要加密的API）
     */
    @Schema(description = "随机盐值", example = "random_salt_123")
    private String salt;

    /**
     * 设备指纹（可选，用于需要加密的API）
     */
    @Schema(description = "设备指纹", example = "device_123")
    private String deviceFingerprint;


    public CommonRequestDto() {
    }

    public Long getCtime() {
        return ctime;
    }

    public void setCtime(Long ctime) {
        this.ctime = ctime;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(String versionName) {
        this.versionName = versionName;
    }

    public Integer getVersionCode() {
        return versionCode;
    }

    public void setVersionCode(Integer versionCode) {
        this.versionCode = versionCode;
    }

    public String getEncryptedData() {
        return encryptedData;
    }

    public void setEncryptedData(String encryptedData) {
        this.encryptedData = encryptedData;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getDeviceFingerprint() {
        return deviceFingerprint;
    }

    public void setDeviceFingerprint(String deviceFingerprint) {
        this.deviceFingerprint = deviceFingerprint;
    }
}
